The present invention relates generally to optical checking systems and more particularly to an optical method and apparatus for accurately measuring the three-dimensional position, size and shape of a hole in a workpiece.
In manufacturing workpieces, parts and assemblies by processes such as stamping, extrusion, drawing and casting, from materials such as sheet or bulk metal, plastic, film rubber and the like, it is often necessary to make accurate dimensional measurements of the workpiece in order to obtain economies of manufacturing and to produce high quality products. Dimensional measurements may be taken either on-line, as the manufacturing process operates on the workpiece, or off-line, upon samples temporarily removed from the manufacturing production line. In either event, it is necessary that measurements be taken rapidly at many points and in such a manner that the workpiece itself is not touched or otherwise substantially altered by the measurement process.
Inasmuch as a given workpiece may have one or more holes therein, e.g. mounting holes, alignment holes, access apertures, and the like, the accurate measurement of the location, orientation, size and shape of holes is extremely important. A stamped metal hinge part for attaching a door to a motor vehicle is a prime example of a part which requires highly accurate hole positioning, if the door is to fit properly on the finished vehicle.
Presently available optical measuring systems are subject to several shortcomings, particularly where the measurement of holes is concerned. One major difficulty with most optical scanning systems is the inability to precisely determine the perimeter of the hole without a priori information concerning the expected size of the hole. This difficulty results from the fact that known optical scanning systems project a given illumination pattern upon the workpiece and then analyze the manner in which the pattern appears altered upon reflecting from the workpiece. In such systems, the location of a hole appears as a dropout or gap in the predetermined pattern, the boundaries of the dropout or break in the reflected light pattern yielding data from which the position of the hole is determined.
While interesting in theory, it is not easy to determine precisely where the projected light pattern stops and where the drop out begins. Thus, known optical scanning systems have an inherent difficulty with precise hole measurement.
In addition to the above fundamental problem, many known systems are highly specialized and provide limited three-dimensional data, thus limiting their application. Other more sophisticated systems tend to be complex, costly and large in physical size. In addition, these sophisticated systems produce such complex image data that the computer processing time required to assimilate the data is excessive.
It is therefore an object of the present invention to overcome the shortcomings of known optical scanning systems by providing an optical method for accurately locating the three-dimensional position of a hole in a workpiece.
It is also an object of the invention to provide an optical system which may be readily adapted to a wide variety of uses and which minimizes computer processing time to make on-line dimensional testing practical.
It is a further object of the invention to provide a method for measuring the location of a hole in a workpiece with only a minimum of a priori information about the dimensions and orientation of the hole.
It is also an object of the invention to provide an intelligent hole measuring system which is capable of taking surface discontinuities into account without overtaxing the data processing computer.
In general, the present invention comprises a method for measuring the location of a hole in a workpiece using a combination of structured lighting, i.e. light projected in a predetermined pattern, and feature lighting, i.e. substantially uniform back lighting or front lighting. In accordance with the invention, feature lighting is used to illuminate the workpiece, thereby producing an image in image space from which the centroid of the hole may be determined. Structured lighting, preferably including one or more crosshair patterns, is also projected onto the workpiece to produce a reflected image in image space from which the plane containing the hole may be determined. Alternate structured lighting could be used, including a projection of three or more point sources of light or a projection of two or more parallel lines. Using the centroid data in image space there is determined a line in real space which passes through the center of the hole being measured. The exact location of the hole is then determined by determining the intersection of the line which passes through the hole center and the plane containing the hole.
Further, in accordance with the invention, video sensors or the equivalent are positioned in a fixed location and at a known vantage point or viewing angle relative to the structured lighting source and the viewing table or workpiece fixture. The optical data received by the video sensor is encoded as digitial data which is manipulated and stored by the data processing computer. The data received by the sensor comprises a representation of the received light in two-dimensional image space.
According to the invention, image space is related to three-dimensional space by predetermining a transformation between image space and real space, preferably in the form of a rectification table or matrix. The rectification table may be established in which the known pattern of structured lighting is reflected from the viewing table or other surface of known orientation, and the received pattern in image space is recorded and used to generate a plurality of image space data which correspond to each point in real space. The predetermind transformation matrix is then used by the invention in determining the centroid of the hole from feature lighting information and used to determine the plane in which the hole is located from structured lighting information.
Where surface discontinuities, such as bulges in the neighborhood of the hole caused by stamping, might cause inaccuracies, the invention provides for the determination of a data window, based on or relative to the position of the centroid and which excludes the discontinuities. The plane in which the hole lies is then determined using structured lighting falling within the data window. In this fashion, inaccurate results are avoided without excessive time-consuming computation.
These and other objects and advantages of the present invention will become more apparent from a reading of the detailed description of the preferred embodiment and by reference to the accompanying drawings.